
var baseFunction = (function () {


	function js_date_time(unixtime) {
	   var dateTime = new Date(parseInt(unixtime) * 1000)
	   var year = dateTime.getFullYear();
	   var month = dateTime.getMonth() + 1;
	   var day = dateTime.getDate();
	   var hour = dateTime.getHours();
	   var minute = dateTime.getMinutes();
	   var second = dateTime.getSeconds();
	   var now = new Date();
	   var now_new = Date.parse(now.toDateString()); //typescript转换写法
	   var milliseconds = now_new - dateTime;
	   var timeSpanStr = year + '-' + month + '-' + day + ' ' + hour + ':' + minute;
	   return timeSpanStr;
	}
	function js_date(unixtime) {
	   var dateTime = new Date(parseInt(unixtime) * 1000)
	   var year = dateTime.getFullYear();
	   var month = dateTime.getMonth() + 1;
	   var day = dateTime.getDate();
	   var timeSpanStr = year + '-' + month + '-' + day ;
	   return timeSpanStr;
	}
	function js_split(str){
		return str.split(",");
	}
	
	// exports
	return {
		js_date_time,
		js_split,
		js_date
	}
})()

export default baseFunction
